import React, { Component } from 'react';
class Demo extends Component{
  constructor(props){
    super(props)
    console.log(props)//{msg:"牛"}
    console.log(this)//Demo
    console.log(this.props)//undefind
  }
  render(){
    console.log(this)
    console.log(this.props)
    return <h1>Demo组件{this.props.msg}</h1>
  }
}
class App extends Component {
  constructor(props){
    super(props);
    console.log(this.props)
    console.log(props)
  }
  render() {
    return (
      <div>
        <Demo msg="🐂"></Demo>
      </div>
    );
  }
}

export default App;
